/**
 * 
 */
package br.srv.full.virtual.entities.ids;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * @author Delfino
 * 
 */
@Embeddable
public class StateId extends BaseId {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * @param p_value
	 */
	public StateId(String p_value) {
		setNumber(p_value);
	}

	/**
	 * @param p_trim
	 * @param p_trim2
	 */
	public StateId(String p_trim, String p_trim2) {
		this(p_trim);
		setEmiter(p_trim2);
	}

	{
		setType("StateId");
	}

	/**
	 * 
	 */
	public StateId() {
		super();
	}
	@Column(length = 20)
	private String emiter;

	/**
	 * @return the emmiter
	 */
	public String getEmiter() {
		return emiter;
	}

	/**
	 * @param p_emmiter
	 *            the emmiter to set
	 */
	public void setEmiter(String p_emiter) {
		emiter = p_emiter;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see br.srv.full.virtual.entities.ids.BaseId#toString()
	 */
	@Override
	public String toString() {
		return getType() + ": " + getNumber() + " - " + getEmiter();
	}
}
